package com.itheima.controller;
import com.itheima.service.BirdService;
import org.springframework.stereotype.Controller;
import javax.annotation.Resource;
//使用Controller注解将BirdController类标识为Spring中的Bean
@Controller
public class BirdController {
    //使用@Resource注解注入BirdService
    @Resource(name="birdService")
    public BirdService birdService;
    public void fly(){
        this.birdService.fly();
    }
}
